#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

void cal(int x, int b)
{
    if (x < b) {
        if (x >= 10) cout << char(x - 10 + 'A');
        else cout << x;
    }
    else {
        if (x / b >= 10) cout << char(x / b - 10 + 'A');
        else cout << x / b;

        if (x % b >= 10) cout << char(x % b - 10 + 'A');
        else cout << x % b;
    }
}
int main()
{
   
    int n;
    cin >> n;

    for (int i = 1; i < n; i++) {
        for (int j = 1; j <= i; j++) {
            cal(i, n);
            cout << "*";
            cal(j, n);
            cout << "=";
            cal(i * j, n);
            cout << " ";
        }
        cout << endl;
    }

    return 0;
}